﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CITPRO.Linq.LinqToOdbc.DialectProviders {
    public class LegacyODBCDialectProvider : IDialectProvider {
        /// <summary>
        /// Target format example: {D '2011-06-23'}
        /// </summary>
        /// <param name="date"></param>
        /// <returns></returns>
        public string FormatForDate(object date) {
            var dateTime = (DateTime)date;

            return string.Format("{{D '{0}'}}", dateTime.ToString("yyyy-MM-dd"));

        }
    }
}
